// ActorApi.js 封装演员模块相关接口
import myaxios from "../../MyAxios";
import BASEURL from "../../BaseUrl";
const JKTURL = BASEURL.JKTURL;

const SchoolApi = {
  /**驾校列表
   * 查询所有驾校
   * @param {Object} params 请求参数对象。例如： {page:1, pagesize:10}
   */
  queryAllSchool(params) {
    let url = JKTURL + "/driverschool/list";
    return myaxios.get(url, params);
  },
  /**
   * 模糊搜索驾校
   * @param {Object} params 请求参数对象。例如： {page:1, pagesize:10,schoolName:'顺'}
   */
  searchSchool(params) {
    let url = JKTURL + "/driverschool/ByName";
    return myaxios.get(url, params);
  },
  /**
   * 用户距离多少km内的驾校  排序
   * @param {Object} params
   * distance 多少km以内
   * {page:1, pagesize:10,user_lng:106.495551,user_lat:29.594759,distance:10}
   */
  schoolDistanceSort(params) {
    let url = JKTURL + "/driverschool/ByGap";
    return myaxios.get(url, params);
  },
  /**距离优先
   * 用户周边最近的所有驾校
   * @param {Object} params
   *
   * {page:1, pagesize:10,user_lng:106.495551,user_lat:29.594759}
   */
  schoolNearestList(params) {
    let url = JKTURL + "/driverschool/distance";
    return myaxios.get(url, params);
  },
  /**
   * 评分驾校排序
   * @param {Object} params
   *
   * {page:1, pagesize:10}
   */
  schoolScoreSort(params){
    let url = JKTURL + "/driverschool/score";
    return myaxios.get(url,params)
  },
  /**
   * 驾校详情
   * @param {Object} params  {school_id:1}
   *
   * 
   */
  ByIdSchoolDetail(params){
    let url=JKTURL+"/driverschool/ById"
    return myaxios.get(url,params)
  },
  /**
   * 获取驾校所有标签 
   */
  getSchoolType(){
    let url=JKTURL+"/driverschool/types"
    return myaxios.get(url)
  },
  /**
   * 获取驾校驾照类型所有标签
   */
  getSchoolLicense(){
    let url=JKTURL+"/driverschool/license"
    return myaxios.get(url)
  },

  /**驾校标签筛选
   *@param {Object} params  
   *{page:1, pagesize:10,user_lng:106.495551,user_lat:29.594759,label:'规模大'}
   */
  schoolByLabellList(params){
    let url=JKTURL+"/driverschool/ByLabel"
    return myaxios.get(url,params)
  },

  /** 驾考类型 筛选
   *@param {Object} params  
   *{page:1, pagesize:10,user_lng:106.495551,user_lat:29.594759,type:c1}
   */
   schoolByLicenceTypeList(params){
    let url=JKTURL+"/driverschool/ByType"
    return myaxios.get(url,params)
  },

  /**
   * 报名轮播图模块
   * @param {Object} params   {carousel_id:2}
   * 
   */
  singUpSwiperHttp(params){
    let url=JKTURL+"/banner/ById"
    return myaxios.get(url,params)
  }
 
  
  
};
export default SchoolApi;
